cmake_minimum_required(VERSION 3.0.4)
project(control_cmd)

set(CMAKE_BUILD_TYPE "Release")
ADD_COMPILE_OPTIONS(-std=c++14 )

set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")

find_package(Eigen3 REQUIRED)
find_package(PCL 1.7 REQUIRED)

#ros package
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  nav_msgs
  quadrotor_msgs
  mavros_msgs
  geometry_msgs
  tf2
  tf2_ros
  #obstacle_avoid_node
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES cmd_fsm_node
  #CATKIN_DEPENDS obstacle_avoid_node
)

include_directories(
  include
  SYSTEM
  ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/include
  ${EIGEN3_INCLUDE_DIR}
  ${PCL_INCLUDE_DIRS}
)

add_executable(control_cmd_node src/control_cmd_node.cpp src/control_cmd_fsm.cpp)

target_link_libraries(control_cmd_node ${catkin_LIBRARIES})
